<?php
hc_core_ClassLoader::load('substrate_Context');
class halo_ViewHelperUtil {
    static public function LOAD(substrate_Context $context, $viewHelperNames) {
        $viewHelpers = array();
        if ( ! is_array($viewHelperNames) ) {
            $viewHelperNames = array($viewHelperNames);
        }
        foreach ( $viewHelperNames as $viewHelperName ) {
            foreach ( array('', 'ViewHelper') as $suffix ) {
                $actualViewHelperName = $viewHelperName . $suffix;
                if ( $context->exists($actualViewHelperName) ) {
                    $viewHelpers[] = $context->get($actualViewHelperName);
                    break;
                }
            }
        }
        return $viewHelpers;
    }
}
?>
